80205: Function test xfi:identical-node-set

Documentation

Tests of xfi:identical-node-set($left as node()*, $right as node()*) as xs:boolean

Owners

Name Affiliation Email Start End
Herm Fischer UBMatrix / Mark V Systems fischer@markv.com 19-02-2008 at 00:00:00

Test Case Variations


V-01 Works for set of three in order.

Documentation

Tests that the function returns true for identical sets in order

Inputs

  • schema: facts-in-instance.xsd
  • instance: tuple-instance.xml (DTS Discovery starting point) (ID=V01)
  • Function Call: xfi:identical-node-set( (/xbrli:xbrl, //xbrli:context[@id eq 'context-vulcan'], //concept:t1[@id eq 'i2']), (/xbrli:xbrl, //xbrli:context[@id eq 'context-vulcan'], //concept:t1[@id eq 'i2']) )

    (against file V01)

Outputs

  • Result test: count( $result ) eq 1 and $result eq true()

V-02 Works for set of three, second different order.

Documentation

Tests that the function returns true for identical sets not in order

Inputs

  • schema: facts-in-instance.xsd
  • instance: tuple-instance.xml (DTS Discovery starting point) (ID=V02)
  • Function Call: xfi:identical-node-set( (/xbrli:xbrl, //xbrli:context[@id eq 'context-vulcan'], //concept:t1[@id eq 'i2']), (/xbrli:xbrl, //concept:t1[@id eq 'i2'], //xbrli:context[@id eq 'context-vulcan']) )

    (against file V02)

Outputs

  • Result test: $result eq true()

V-03 Works for sets of three, second containing duplicate entry.

Documentation

Tests that the function returns true by de-duplicating the second sequence into a set.

Inputs

  • schema: facts-in-instance.xsd
  • instance: tuple-instance.xml (DTS Discovery starting point) (ID=V03)
  • Function Call: xfi:identical-node-set( (/xbrli:xbrl, //xbrli:context[@id eq 'context-vulcan'], //concept:t1[@id eq 'i2']), (/xbrli:xbrl, //concept:t1[@id eq 'i2'], //xbrli:context[@id eq 'context-vulcan'], (: this is superfluous, but allowed by definition though possibly disallowed if strict set membership enforced :) /xbrli:xbrl) )

    (against file V03)

Outputs

  • Result test: $result eq true()

V-04 Works for sets of three containing different members.

Documentation

Tests that the function returns false if the second set doesn't include entry present in first set

Inputs

  • schema: facts-in-instance.xsd
  • instance: tuple-instance.xml (DTS Discovery starting point) (ID=V04)
  • Function Call: xfi:identical-node-set( (/xbrli:xbrl, //xbrli:context[@id eq 'context-vulcan'], //concept:t1[@id eq 'i2']), (/xbrli:xbrl, //concept:t1[@id eq 'i2'], //xbrli:context[@id eq 'context-earth']) )

    (against file V04)

Outputs

  • Result test: $result eq false()

V-05 Works for an empty set.

Documentation

Tests that the function returns true for empty set

Inputs

Outputs

  • Result test: count( $result ) eq 1 and $result eq true()

V-06 Wrong node to function

Documentation

XBRL-defined error for node type incorrect.

Inputs

  • schema: facts-in-instance.xsd
  • instance: tuple-instance.xml (DTS Discovery starting point) (ID=V06)
  • Function Call: xfi:identical-node-set((//xbrli:context[1]), ("hello world"))

    (against file V06)

Outputs

  • Error code: xqt-err:XPTY0004

Revisions

Name On Details
Herm Fischer 01-04-2008 at 00:00:00 Fixed instance name and contents.
Herm Fischer 30-01-2008 at 00:00:00 Created the test case.